/**
 *	@file	album_def.h
 *	@brief	フォトアルバム　リテラル定義
 *	@author	Miyuki Iwasawa
 *	@date	08.05.28
 */

#ifndef __H_ALBUM_DEF_H__
#define __H_ALBUM_DEF_H__

///フレーム定義
#define UFRM_MSG	(GF_BGL_FRAME0_S)
#define UFRM_BACK	(GF_BGL_FRAME2_S)
#define UFRM_THUMB	(GF_BGL_FRAME3_S)

#define UFRM_MSG_PRI	(0)
#define UFRM_BACK_PRI	(3)
#define UFRM_THUMB_PRI	(2)

#define DFRM_MSG	(GF_BGL_FRAME0_M)
#define DFRM_SUB	(GF_BGL_FRAME1_M)
#define DFRM_EFF	(GF_BGL_FRAME2_M)
#define DFRM_BACK	(GF_BGL_FRAME3_M)

#define DFRM_MSG_PRI	(0)
#define DFRM_SUB_PRI	(1)
#define DFRM_EFF_PRI	(2)
#define DFRM_BACK_PRI	(3)

typedef enum{
 VIEW_LEFT = 1,
 VIEW_RIGHT,
 VIEW_BOTH,
}ALBUM_VIEW;

typedef enum{
 SCRN_BASE = DFRM_BACK,
 SCRN_EFF = DFRM_EFF,
}ALBUM_SCRN;

///シーケンス定義
typedef enum{
 SEQ_FADE_IN,
 SEQ_PIC_SELECT,
 SEQ_PAGE_UP,
 SEQ_PAGE_DOWN,
 SEQ_LIST_SELECT,
 SEQ_PIC_MOVE,
 SEQ_MOVE_EFFECT,
 SEQ_PIC_DEL,
 SEQ_FADE_OUT,
 SEQ_EXIT,
}ALBUM_SEQ;

typedef enum{
 STATE_SELECT,
 STATE_MOVE,
 STATE_DEL,
}ALBUM_STATE;

///実行コード定義
typedef enum{
 EXE_SEL_PIC01,
 EXE_SEL_PIC02,
 EXE_SEL_PIC03,
 EXE_SEL_PIC04,
 EXE_SEL_PIC05,
 EXE_SEL_PIC06,
 EXE_SEL_PIC07,
 EXE_SEL_PIC08,
 EXE_SEL_PIC09,
 EXE_SEL_PIC10,
 EXE_SEL_PIC11,
 EXE_SEL_PIC12,
 EXE_SEL_BACK,
 EXE_SEL_PAGEU,
 EXE_SEL_PAGED,
};

///キーチェック
#define CHK_KTST_KEY_SELECT	(PAD_BUTTON_DECIDE|PAD_BUTTON_CANCEL|PAD_KEY_UP|PAD_KEY_DOWN|PAD_KEY_LEFT|PAD_KEY_RIGHT)

///SE
#define	ALBUM_SE_DECIDE	( SEQ_SE_DP_SELECT )	//
#define	ALBUM_SE_PAGE	( SEQ_SE_GS_ALBUMMEKURU )	//
#define ALBUM_SE_SELECT	( SEQ_SE_DP_SELECT )

///メッセージIDX定義
enum{
 MIDX_EXP_SELECT,
 MIDX_EXP_DOIT,
 MIDX_EXP_MOVE,
 MIDX_EXP_MOVE_EFF,
 MIDX_EXP_DEL,
 MIDX_EXP_MAX,
};

enum{
 MIDX_PIC_SINGLE,
 MIDX_PIC_PLURAL,
 MIDX_PIC_MAX,
};
#define WORDSET_ALBUM_BUFLEN	(16)
#define WORDSET_ALBUM_BUFNUM	(6)
#define ALBUM_MSG_BUFLEN		(128)	///<メッセージ展開バッファ長

///////////////////////////////////////////
//レイアウト定義
#define PAGE_DNUM_X		(4)
#define PAGE_DNUM_XH	(PAGE_DNUM_X/2)
#define PAGE_DNUM_Y	(3)
#define PAGE_DATA_NUM	(PAGE_DNUM_X*PAGE_DNUM_Y)

#define CUR_LIM_R	(PAGE_DNUM_X-1)
#define CUR_LIM_L	(0)
#define CUR_LIM_U	(0)
#define CUR_LIM_D	(PAGE_DNUM_Y+1)

#define THUMB_BG_PX	(4)
#define THUMB_BG_PY	(1)
#define THUMB_BG_W	(5)
#define THUMB_BG_H	(5)
#define THUMB_BG_OX	(6)
#define THUMB_BG_OY	(5)
#define THUMB_BGS_XNUM	(6)

#define PIC_BG_PX		(13)
#define PIC_BG_PY		(8)
#define PIC_BG_SCRL_X	(-4)

#define BKBTN_BG_PX	(24)
#define BKBTN_BG_PY	(20)
#define BKBTN_BG_W	(8)
#define BKBTN_BG_H	(4)
#define BKBTN_BGS_X	(0)
#define BKBTN_BGS_Y	(0)

#define PAGE_BGS_X	(0)
#define PAGE_BGS_Y	(24)
#define PAGE_BG_W	(1)
#define PAGE_BG_H	(2)
#define PAGE_BG_PX	(3)
#define PAGE_BG_PY	(15)

///////////////////////////////////////////
//アクター関連
#define ALBUM_ACTRES_MAX	(3)	///<リソース数
#define ALBUM_ACTPAL_NUM	(3)	///<管理パレット数

enum{
 ACT_CURSOR,
 ACT_CUR_S,
 ACT_ALLOW_L,
 ACT_ALLOW_R,
 ACT_RET,
 ALBUM_ACTMAX,
};

enum{
 ANM_AL_LN,
 ANM_AL_LT,
 ANM_AL_LF,
 ANM_AL_RN,
 ANM_AL_RT,
 ANM_AL_RF,
 ANM_CURSOR,
 ANM_CUR_S,
 ANM_RET,
 ANM_RETA,
};

#define ACT_CUR_PX	(28)
#define ACT_CUR_PY	(8)
#define ACT_CUR_OX	(48)
#define ACT_CUR_OY	(40)
#define ACT_CUR_COX	(8)

#define ACT_BACK_PX	(24*8)
#define ACT_BACK_PY	(20*8)

#define ACT_RET_PX	(28*8)
#define ACT_RET_PY	(22*8)

#define ACT_ALLOW_PY	(8*8)
#define ACT_ALLOWL_PX	(2*8)
#define ACT_ALLOWR_PX	(30*8)

///////////////////////////////////////////
///パレット定義
#define BACK_FONT_PAL	(1)
#define MSG_FONT_PAL	(10)
//ここまでnclの中
///////////////////////////////////
#define SBOX_PAL		(11)
#define TALK_FONT_PAL	(12)
#define BMP_TALK_WIN_PAL	(13)
#define YESNO_WIN_PAL		(14)	//2本占有

#define	FCOL_W_BLACK	( GF_PRINTCOLOR_MAKE( FBMP_COL_BLACK, FBMP_COL_BLK_SDW, FBMP_COL_WHITE ) )		// フォントカラー：黒
#define	FCOL_N_BLACK	( GF_PRINTCOLOR_MAKE( 3, 2, FBMP_COL_NULL ) )		// フォントカラー：黒

///////////////////////////////////////////
///BMPウィンドウ定義

enum{
 WIN_BACK,
 WIN_MSG,
 WIN_PIC,
 WIN_MAX,
};

///ウィンドウ関連キャラ領域指定(上下共用)
#define BMP_TALK_WIN_CGX	(1)

/////////////////////////////////////////////
//下画面用

//選択ボックスウィンドウ領域
#define SBOX_SEL_CT	(4)
#define SBOX_WCGX	(BMP_TALK_WIN_CGX+TALK_WIN_CGX_SIZ)
#define SBOX_W		(8)
#define SBOX_FCGX_SIZ	(8*2*SBOX_SEL_CT)
#define SBOX_FCGX	(SBOX_WCGX+SBOX_WINCGX_SIZ)

//はい・いいえメニュー領域
#define	BMP_YESNO_PX	( 25 )
#define	BMP_YESNO_PY	( 16 )
#define BMP_YESNO_FRM	( DFRM_MSG )
#define	BMP_YESNO_PAL	( YESNO_WIN_PAL )
#define BMP_YESNO_CGX_SIZ	(TOUCH_SW_USE_CHAR_NUM)
#define	BMP_YESNO_CGX	( SBOX_FCGX+SBOX_FCGX_SIZ )

//メッセージ領域
#define	BMP_MSG_PX	( 2 )
#define	BMP_MSG_PY	( 19 )
#define	BMP_MSG_SX	( 19 )
#define	BMP_MSG_SY	( 4 )
#define BMP_MSG_FRM	( DFRM_MSG )
#define	BMP_MSG_PAL	( TALK_FONT_PAL )
#define BMP_MSG_CGX_SIZ	(BMP_MSG_SX*BMP_MSG_SY)
#define	BMP_MSG_CGX	( BMP_YESNO_CGX+BMP_YESNO_CGX_SIZ )

///やめるボタン
#define	BMP_BACK_PX	( 25 )
#define	BMP_BACK_PY	( 21 )
#define	BMP_BACK_SX	( 6 )
#define	BMP_BACK_SY	( 2 )
#define BMP_BACK_FRM	( DFRM_SUB )
#define	BMP_BACK_PAL	( BACK_FONT_PAL )
#define BMP_BACK_CGX_SIZ	(BMP_BACK_SX*BMP_BACK_SY)
#define	BMP_BACK_CGX	( BMP_MSG_CGX+BMP_MSG_CGX_SIZ )

///////////////////////////////////////////
//上画面用
#define	BMP_PIC_PX	( 1 )
#define	BMP_PIC_PY	( 15 )
#define	BMP_PIC_SX	( 28 )
#define	BMP_PIC_SY	( 8 )
#define BMP_PIC_FRM	( UFRM_MSG )
#define	BMP_PIC_PAL	( MSG_FONT_PAL )
#define BMP_PIC_CGX_SIZ	(BMP_PIC_SX*BMP_PIC_SY)
#define	BMP_PIC_CGX	( BMP_TALK_WIN_CGX+TALK_WIN_CGX_SIZ )

///////////////////////////////////////////////
///タッチパネル定義
#define TP_THUMB_W		(40)
#define TP_THUMB_H		(32)

#define TP_THUMB_OX		(48)
#define TP_THUMB_PX1	(4*8)
#define TP_THUMB_PX2	(TP_THUMB_PX1+TP_THUMB_OX)
#define TP_THUMB_PX3	(TP_THUMB_PX2+TP_THUMB_OX+8)
#define TP_THUMB_PX4	(TP_THUMB_PX3+TP_THUMB_OX)

#define TP_THUMB_OY		(40)
#define TP_THUMB_PY1	(12)
#define TP_THUMB_PY2	(TP_THUMB_PY1+TP_THUMB_OY)
#define TP_THUMB_PY3	(TP_THUMB_PY2+TP_THUMB_OY)

#define TP_BACK_PX		(24*8+2)
#define TP_BACK_PY		(20*8+2)
#define TP_BACK_W		(64-4)
#define TP_BACK_H		(32-6)

#define TP_PAGEU_PX		(1*8)
#define TP_PAGED_PX		(29*8)
#define TP_PAGE_PY		(ACT_ALLOW_PY-16)
#define TP_PAGE_W		(16)
#define TP_PAGE_H		(32)

#endif	//__H_ALBUM_DEF_H__
